﻿// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
//
// 本项目主要遵循 MIT 许可证和 Apache 许可证（版本 2.0）进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
//
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！

using Admin.NET.Core;
using Magicodes.ExporterAndImporter.Core;
using Magicodes.ExporterAndImporter.Excel;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

/// <summary>
/// 调拨管理基础输入参数
/// </summary>
public class AllocateBaseInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    public virtual long? Id { get; set; }
    
    /// <summary>
    /// 调拨单号
    /// </summary>
    public virtual string? AllocateCode { get; set; }
    
    /// <summary>
    /// 调拨类型
    /// </summary>
    public virtual long? AllocateTypeId { get; set; }
    
    /// <summary>
    /// 调拨申请日期
    /// </summary>
    public virtual DateTime? AllocateTime { get; set; }
    
    /// <summary>
    /// 调出仓库
    /// </summary>
    public virtual long? WarehouseUPid { get; set; }
    
    /// <summary>
    /// 调入仓库
    /// </summary>
    public virtual long? WarehouseEnter { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>
    public virtual long? Attn { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public virtual string? Remark { get; set; }
    
    /// <summary>
    /// 调拨明细
    /// </summary>
    public virtual string? Details { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    public virtual string? UploadAttachments { get; set; }
    
}

/// <summary>
/// 调拨管理分页查询输入参数
/// </summary>
public class PageAllocateInput : BasePageInput
{
    /// <summary>
    /// 调拨单号
    /// </summary>
    public string? AllocateCode { get; set; }
    
    /// <summary>
    /// 调拨类型
    /// </summary>
    public long? AllocateTypeId { get; set; }
    
    /// <summary>
    /// 调拨申请日期范围
    /// </summary>
     public DateTime?[] AllocateTimeRange { get; set; }
    
    /// <summary>
    /// 调出仓库
    /// </summary>
    public long? WarehouseUPid { get; set; }
    
    /// <summary>
    /// 调入仓库
    /// </summary>
    public long? WarehouseEnter { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>
    public long? Attn { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    public string? Remark { get; set; }
    
    /// <summary>
    /// 调拨明细
    /// </summary>
    public string? Details { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    public string? UploadAttachments { get; set; }
    
    /// <summary>
    /// 选中主键列表
    /// </summary>
     public List<long> SelectKeyList { get; set; }
}

/// <summary>
/// 调拨管理增加输入参数
/// </summary>
public class AddAllocateInput
{
    /// <summary>
    /// 调拨单号
    /// </summary>
    [MaxLength(32, ErrorMessage = "调拨单号字符长度不能超过32")]
    public string? AllocateCode { get; set; }
    
    /// <summary>
    /// 调拨类型
    /// </summary>
    public long? AllocateTypeId { get; set; }
    
    /// <summary>
    /// 调拨申请日期
    /// </summary>
    public DateTime? AllocateTime { get; set; }
    
    /// <summary>
    /// 调出仓库
    /// </summary>
    public long? WarehouseUPid { get; set; }
    
    /// <summary>
    /// 调入仓库
    /// </summary>
    public long? WarehouseEnter { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>
    public long? Attn { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 调拨明细
    /// </summary>
    [MaxLength(32, ErrorMessage = "调拨明细字符长度不能超过32")]
    public string? Details { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    [MaxLength(2000, ErrorMessage = "上传附件字符长度不能超过2000")]
    public string? UploadAttachments { get; set; }
    
}

/// <summary>
/// 调拨管理删除输入参数
/// </summary>
public class DeleteAllocateInput
{
    /// <summary>
    /// 主键Id
    /// </summary>
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
}

/// <summary>
/// 调拨管理更新输入参数
/// </summary>
public class UpdateAllocateInput
{
    /// <summary>
    /// 主键Id
    /// </summary>    
    [Required(ErrorMessage = "主键Id不能为空")]
    public long? Id { get; set; }
    
    /// <summary>
    /// 调拨单号
    /// </summary>    
    [MaxLength(32, ErrorMessage = "调拨单号字符长度不能超过32")]
    public string? AllocateCode { get; set; }
    
    /// <summary>
    /// 调拨类型
    /// </summary>    
    public long? AllocateTypeId { get; set; }
    
    /// <summary>
    /// 调拨申请日期
    /// </summary>    
    public DateTime? AllocateTime { get; set; }
    
    /// <summary>
    /// 调出仓库
    /// </summary>    
    public long? WarehouseUPid { get; set; }
    
    /// <summary>
    /// 调入仓库
    /// </summary>    
    public long? WarehouseEnter { get; set; }
    
    /// <summary>
    /// 经办人
    /// </summary>    
    public long? Attn { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>    
    [MaxLength(32, ErrorMessage = "备注字符长度不能超过32")]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 调拨明细
    /// </summary>    
    [MaxLength(32, ErrorMessage = "调拨明细字符长度不能超过32")]
    public string? Details { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>    
    [MaxLength(2000, ErrorMessage = "上传附件字符长度不能超过2000")]
    public string? UploadAttachments { get; set; }
    
}

/// <summary>
/// 调拨管理主键查询输入参数
/// </summary>
public class QueryByIdAllocateInput : DeleteAllocateInput
{
}

/// <summary>
/// 下拉数据输入参数
/// </summary>
public class DropdownDataAllocateInput
{
    /// <summary>
    /// 是否用于分页查询
    /// </summary>
    public bool FromPage { get; set; }
}

/// <summary>
/// 调拨管理数据导入实体
/// </summary>
[ExcelImporter(SheetIndex = 1, IsOnlyErrorRows = true)]
public class ImportAllocateInput : BaseImportInput
{
    /// <summary>
    /// 调拨单号
    /// </summary>
    [ImporterHeader(Name = "调拨单号")]
    [ExporterHeader("调拨单号", Format = "", Width = 25, IsBold = true)]
    public string? AllocateCode { get; set; }
    
    /// <summary>
    /// 调拨类型 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? AllocateTypeId { get; set; }
    
    /// <summary>
    /// 调拨类型 文本
    /// </summary>
    [ImporterHeader(Name = "调拨类型")]
    [ExporterHeader("调拨类型", Format = "", Width = 25, IsBold = true)]
    public string AllocateTypeFkDisplayName { get; set; }
    
    /// <summary>
    /// 调拨申请日期
    /// </summary>
    [ImporterHeader(Name = "调拨申请日期")]
    [ExporterHeader("调拨申请日期", Format = "", Width = 25, IsBold = true)]
    public DateTime? AllocateTime { get; set; }
    
    /// <summary>
    /// 调出仓库 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? WarehouseUPid { get; set; }
    
    /// <summary>
    /// 调出仓库 文本
    /// </summary>
    [ImporterHeader(Name = "调出仓库")]
    [ExporterHeader("调出仓库", Format = "", Width = 25, IsBold = true)]
    public string WarehouseUPFkDisplayName { get; set; }
    
    /// <summary>
    /// 调入仓库
    /// </summary>
    [ImporterHeader(Name = "调入仓库")]
    [ExporterHeader("调入仓库", Format = "", Width = 25, IsBold = true)]
    public long? WarehouseEnter { get; set; }
    
    /// <summary>
    /// 经办人 关联值
    /// </summary>
    [ImporterHeader(IsIgnore = true)]
    [ExporterHeader(IsIgnore = true)]
    public long? Attn { get; set; }
    
    /// <summary>
    /// 经办人 文本
    /// </summary>
    [ImporterHeader(Name = "经办人")]
    [ExporterHeader("经办人", Format = "", Width = 25, IsBold = true)]
    public string AttnFkDisplayName { get; set; }
    
    /// <summary>
    /// 备注
    /// </summary>
    [ImporterHeader(Name = "备注")]
    [ExporterHeader("备注", Format = "", Width = 25, IsBold = true)]
    public string? Remark { get; set; }
    
    /// <summary>
    /// 调拨明细
    /// </summary>
    [ImporterHeader(Name = "调拨明细")]
    [ExporterHeader("调拨明细", Format = "", Width = 25, IsBold = true)]
    public string? Details { get; set; }
    
    /// <summary>
    /// 上传附件
    /// </summary>
    [ImporterHeader(Name = "上传附件")]
    [ExporterHeader("上传附件", Format = "", Width = 25, IsBold = true)]
    public string? UploadAttachments { get; set; }
    
}
